@import '/variable.less';
.container {
  background: #fff;
  padding-bottom: 120rpx;
  /* 增加底部空间以适应购物车组件 */
  position: relative;
  min-height: 100vh;
  box-sizing: border-box;
}

/* 商品图片区域 */
.product-image {
  width: 100%;
  height: 420rpx;
  background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 36rpx;
  font-weight: bold;
  position: relative;
  border-radius: 0 0 0rpx 0rpx;
  overflow: hidden;
}

.product-tag {
  position: absolute;
  top: 30rpx;
  right: 30rpx;
  background: @brand-color;
  color: white;
  padding: 8rpx 20rpx;
  border-radius: 30rpx;
  font-size: 22rpx;
  font-weight: 600;
}

/* 商品信息 */
.product-info {
  padding: 30rpx;
  border-bottom: 1rpx solid #f1f2f6;
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20rpx;
}

.product-title {
  font-size: 36rpx;
  font-weight: 700;
  color: #2d3436;
  flex: 1;
  padding-right: 30rpx;
}

.close-btn {
  font-size: 36rpx;
  // color: #db1919;
  color: @brand-color;
  padding: 10rpx;
  background: #f5f6fa;
  border-radius: 50%;
  width: 60rpx;
  height: 60rpx;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-recommend {
  color: @brand-color;
  font-size: 26rpx;
  font-weight: 600;
  margin-bottom: 20rpx;
}

.product-desc {
  color: #666;
  font-size: 28rpx;
  line-height: 1.5;
  margin-bottom: 20rpx;
}

.product-price {
  font-size: 40rpx;
  font-weight: 700;
  color: @brand-color;
}

/* 规格选择 */
.spec-section {
  padding: 30rpx;
  border-bottom: 1rpx solid #f1f2f6;
}

.spec-title {
  font-size: 30rpx;
  font-weight: 600;
  margin-bottom: 24rpx;
  color: #2d3436;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.spec-note {
  font-weight: normal;
  color: #888;
  font-size: 26rpx;
}

.spec-options {
  display: flex;
  flex-wrap: wrap;
  gap: 20rpx;
}

.spec-option {
  border: 1rpx solid @brand-color;
  padding: 20rpx 36rpx;
  border-radius: 36rpx;
  font-size: 26rpx;
  transition: all 0.2s ease;
}

.spec-option.selected {
  border-color: @brand-color;
  background-color: #fff5f5;
  color: @brand-color;
  font-weight: 600;
  position: relative;
  padding-right: 60rpx;
}

.spec-option.selected::after {
  content: '✓';
  position: absolute;
  right: 20rpx;
  top: 50%;
  transform: translateY(-50%);
}

/* 推荐区域 */
.recommendation {
  padding: 30rpx;
  color: #666;
  font-size: 28rpx;
  border-bottom: 1rpx solid #f1f2f6;
  display: flex;
  align-items: center;
  font-weight: 500;
}

/* 底部购物车 */
.cart-footer {
  position: fixed;
  bottom: 10px;
  left: 0;
  right: 0;
  height: 150rpx;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20rpx;
  box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
  z-index: 100;
  max-width: 750rpx;
  margin: 0 auto;
}

.cart-price {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.total-price {
  font-size: 36rpx;
  font-weight: 700;
  color: @brand-color;
}

.selected-spec {
  font-size: 22rpx;
  color: #888;
  margin-top: 4rpx;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200rpx;
}

.quantity-control {
  display: flex;
  align-items: center;
  margin: 0 20rpx;
}

.minus-btn,
.plus-btn {
  width: 50rpx;
  height: 50rpx;
  border-radius: 50%;
  background: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 32rpx;
  font-weight: bold;
}

.minus-btn.disabled {
  opacity: 0.5;
}

.quantity {
  margin: 0 20rpx;
  font-size: 32rpx;
  font-weight: 600;
  min-width: 40rpx;
  text-align: center;
}

.add-cart-btn {
  background: #ccc;
  color: #fff;
  padding: 16rpx 30rpx;
  border-radius: 40rpx;
  font-size: 28rpx;
  font-weight: 600;
  transition: all 0.3s;
}

.add-cart-btn.active {
  background: @brand-color;
}

/* Toast提示 */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 24rpx 40rpx;
  border-radius: 16rpx;
  z-index: 1000;
  font-size: 28rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.toast.show {
  opacity: 1;
}

/* 动画效果 */
@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.pulse {
  animation: pulse 0.5s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30rpx);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.sticky-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: white;
  padding: 20rpx 30rpx;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
}